#pragma once

#include <AVUITriggerBase.h>

namespace AVUI {
class SetterBaseCollection;
class ConditionCollection;

/// <summary>Represents a trigger that applies property values or performs actions when a set of conditions are satisfied.</summary>
class MultiTrigger : public TriggerBase
{
public:
    DECLARE_ELEMENT(MultiTrigger, TriggerBase);

#pragma region Public Methods

    /// <summary>Initializes a new instance of the <see cref="T:System.Windows.MultiTrigger" /> class.</summary>
    MultiTrigger();

#pragma endregion Public Methods

#pragma region Public Properties

    /// <summary>Gets a collection of <see cref="T:System.Windows.Condition" /> objects. Changes to property values are applied when all of the conditions in the collection are met.</summary>
    /// <returns>The default is an empty collection.</returns>
    ConditionCollection* get_Conditions() { VerifyAccess(); return m_pConditions; }
    DECLARE_READONLY_PROPERTY(Conditions, ConditionCollection, false);

    /// <summary>Gets a collection of <see cref="T:System.Windows.Setter" /> objects, which describe the property values to apply when all of the conditions of the <see cref="T:System.Windows.MultiTrigger" /> are met.</summary>
    /// <returns>The default value is null.</returns>
    SetterBaseCollection* get_Setters();
    DECLARE_READONLY_PROPERTY(Setters, SetterBaseCollection, true);

#pragma endregion Public Properties

public:

#pragma region Internal Methods

    virtual bool GetCurrentState(DependencyObject* pContainer, UncommonField<HybridDictionaryArray>* pDataField) AVUI_OVERRIDE;
    virtual void Seal() AVUI_OVERRIDE;

#pragma endregion Internal Methods

private:

    TRefCountedPtr<SetterBaseCollection> m_pSetters;
    TRefCountedPtr<ConditionCollection> m_pConditions;
};




}; // namespace AVUI
